package Test;

public class demo {
    public static void main(String[] args) {
        Dog dog=new Dog();
        dog.eat();
        dog.drink();
        Cat cat=new Cat();
        cat.eat();
        cat.drink();
    }
}
abstract class animal{
    public void drink(){
        System.out.println("喝水");
    }
    public abstract void eat();
}

class  Dog  extends animal{
    public void  eat(){
        System.out.println("狗吃肉");
    }
}
class Cat extends animal{
    public void eat(){
        System.out.println("猫吃鱼");
    }
}
